home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: Nicholas Paldino <np1010@cnsunix.albany.edu>
- Newsgroups: comp.lang.c
- Subject: HELP NEEDED: Passing input to an already running program.
- Date: Thu, 11 Jan 1996 17:56:06 -0800
- Organization: Netcom
- Message-ID: <30F5BFB6.75CF@cnsunix.albany.edu>
- NNTP-Posting-Host: ix-nyc19-12.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-NETCOM-Date: Thu Jan 11 3:01:02 PM PST 1996
- X-Mailer: Mozilla 2.0b5 (Win95; I; 16bit)
-
- I posted this about a day ago with no response. I am a little anxious to
- get this problem solved.
-
- I am writing an application that will "launch" another program called
- irc. The problem is I need to pass input to irc once I invoke it from
- the original program. IRC will be invoked using the funtion system().
- Once irc is called it takes input from the keyboard. This is what I have
- tried so far:
-
- -> Using fprintf(stdin, ".....");
- I thought that if I wrote to the stdin file, it would be passed to IRC as
- input from the keyboard. This didn't work.
-
- -> Using system("...");
- This didn't work either. it just passed commands to the shell that IRC
- was running from.
-
- -> Redirecting input using the system("irc < input.file")
- This worked and inputted the commands that were contained in input.file
- but afterwards the IRC program frose on me and would not accept input
- anymore.
-
- Can anyone help me here? I would apprecate any help that can be offered.
-
- - Nicholas Paldino
- - np1010@cnsunix.albany.edu
-